﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dispatch.Receive
{
    #region AGV相关
    internal struct AgvReceiveData
    {
        public int AgvID { get; set; }
         public int X { get; set; }
        public int Y { get; set; }

        public AgvStateEnum State { get; set; }
        public bool UpFull { get; set; }
        public bool DownFull { get; set; }
    }


    internal enum AgvStateEnum
    {
        行驶 = 1,
        停止 = 2,
        运动控制 = 3,
        到达 = 4,
        异常 = 5,
        上层传出中 = 6,
        下层传出中 = 7,
        上层传入中 = 8,
        下层传入中 = 9,

        上层传出完成 = 10,
        下层传出完成 = 11,
        上层传入完成 = 12,
        下层传入完成 = 13,

        上入下出中 = 14,
        上出下入中 = 15,

        上入下出完成 = 16,
        上出下入完成 = 17,

        可传输= 18,
    }

    #endregion


    #region 传输坞相关

    /// <summary>
    /// 接收的来自传输坞的数据
    /// </summary>
    internal struct DeviceReceiveData
    {
        /// <summary>
        /// 传输坞IP
        /// </summary>
        public string IP { get; set; }

        /// <summary>
        /// 传输坞编号
        /// </summary>
        public int DockNum { get; set; }

        /// <summary>
        /// 指令类型
        /// </summary>
        public DeviceCmdEnum Cmd { get; set; }

        /// <summary>
        /// 指令的原始数据
        /// </summary>
        public byte[] Raw { get; set; }

        /// <summary>
        /// 传输坞需要出料数量
        /// </summary>
        public int OutNum { get; set; }


        /// <summary>
        /// 传输坞需要入料数量
        /// </summary>
        public int InNum { get; set; }
         
    }

    internal enum DeviceCmdEnum
    {
         物料信息, 检测AGV传输状态, 需要出料, 需要入料, 同时进出料, 通知AGV离开, 异常
    }
    #endregion
}
